package com.social.service.certificate.impl;

import com.social.entity.Certificate;
import com.social.entity.EmergencyContact;
import com.social.mapper.CertificateMapper;
import com.social.mapper.EmergencyContactMapper;
import com.social.service.certificate.CertificateService;
import com.social.service.emergencyContact.EmergencyContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "certificateService")
public class CertificateServiceImpl implements CertificateService {

    @Autowired
    private CertificateMapper certificateMapper;
    @Override
    public int addCertificate(Certificate emergencyContact) {
        return certificateMapper.insertSelective(emergencyContact);
    }
    @Override
    public List<Certificate> selectByHouseKeeperId(String id) {
        return certificateMapper.selectByHouseKeeperId(id);
    }

    @Override
    public int deleteByHouseKeeperId(String houseKeeperId) {
        return certificateMapper.deleteByHouseKeeperId(houseKeeperId);
    }
}
